
#ifdef OL_BLUR_BACKGROUND

#include "OLBackgroundRender.h"

#include <QPaintEvent>
#include <QPainter>
#include <QGraphicsBlurEffect>

OLBackgroundRender::OLBackgroundRender(QPixmap& pixmap, QWidget* parent)
    : QWidget(parent), m_background(pixmap)
{
	QGraphicsBlurEffect *blur = new QGraphicsBlurEffect();
    //blur->setBlurRadius(5);
    setGraphicsEffect(blur);
}

OLBackgroundRender::~OLBackgroundRender()
{
}

void OLBackgroundRender::paintEvent(QPaintEvent* e)
{
	QPainter p(this);
    p.drawPixmap(rect(), m_background);
	//p.fillRect(rect(), Qt::white);
}

#endif
